package com.songlin.houxin.admin.controller;


import com.songlin.houxin.admin.api.dto.RegionDTO;
import com.songlin.houxin.admin.api.vo.RegionVO;
import com.songlin.houxin.admin.service.RegionService;
import com.songlin.houxin.common.core.util.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Collection;

/**
 * @author jinYuLinLang
 * @version 1.0.0
 * @ClassName RegionController.java
 * @Description <p></p>
 * @createTime 2022-03-12 06:48:00
 */
@RestController
@RequiredArgsConstructor
@RequestMapping("/region")
@Api(value = "region", tags = "地区表管理")
public class RegionController {

    private final RegionService regionService;


    /**
     * @param dto
     * @return
     */
    @ApiOperation(value = "查询地区信息", notes = "查询地区信息")
    @GetMapping("/queryRegionList")
    public R<Collection<RegionVO>> queryRegionList( RegionDTO dto) {
        return R.ok(regionService.queryRegionList(dto));
    }


}

